var LocalBookmarkSystem = Class.create(//
		BookmarkSystem, {
			source : 'local',
			initialize : function() {
				try {
					this.isPartialLoaded = false;
					this.onReset = false;
					this.algorithm = new IgnoreTagsAlgorithm(this);
					this.initCache = bookmarkStorage.getCache();
					this.initCache = this.initCache.clone();
					chrome.bookmarks.onChanged.addListener(function(id,
									changeInfo) {
							});

				} catch (e) {
					console.dir(e.stack || e);
				}
			},
			reset : function() {
				this.onReset = true;
				this.algorithm = new IgnoreTagsAlgorithm();
				this.algorithm.reset();
				this.onReset = false;
			},

			load : function() {
				this.algorithm.load.apply(this, arguments);
			},
			
			loadCache : function() {
				this.algorithm.loadCache.apply(this, arguments);
			},

			loadCallback : function(args) {
				subPub.publish('local/load', args);
			},
			onRemoteAddBookmark : function() {
				this.algorithm.internalAddBookmark.apply(this, arguments);
			},

			onRemoteUpdateBookmark : function() {
				this.algorithm.internalUpdateBookmark.apply(this, arguments);
			},
			onRemoteRemoveBookmark : function(bookmark, source) {
				this.algorithm.internalRemoveBookmark.call(this, bookmark,
						source);
			},

			onRemoteChangeUrl : function() {
				this.algorithm.internalChangeUrl.apply(this, algorithm);
			},

			onRemoteChangeTag : function() {
				this.algorithm.internalChangeTag.apply(this, algorithm);
			}
		});